<template>
  <h3>数组监听</h3>
  <ul>
    <button @click="click1">点击1</button>
    <button @click="click2">点击2</button>
    <li v-for="(item,index) in List1" :key={index}>{{ item }}</li>
    <div>----------------</div>
    <li v-for="(item,index) in List2" :key={index}>{{ item }}</li>
  </ul>
</template>

<script>
  export default{
    data(){
      return{
        List1: [1,2,3,4,5],
        List2: [6,7,8,9]
      }
    },      
    methods:{
      click1(){
        this.List1.concat(this.List2);
      },
      click2(){
        this.List1 = this.List1.concat(this.List2);
      },
    }
  }
</script>